<template xmlns:a="http://www.w3.org/1999/html">
  <div class="u-page u-page-process-bg u-box">
    <div class="u-cl-white u-pt-20 u-pb-20">
      <div class="u-fz-26 u-font-bold">假定{{ form.subject }}项目由您负责</div>
      <div class="u-number u-pb-10 u-pt-10">
        您将如何完成项目的实施计划，包括工作计划、报价、工期。
      </div>
    </div>
    <!-- 表单 -->
    <div
      class="rule-form rule-form-input-right u-box u-radius-lg u-shadow u-bcl-white"
    >
      <u-form ref="uForm" :model="form">
        <div
          @click="showDemand"
          style="
            font-weight: bold;
            font-size: 30rpx;
            line-height: 220%;
            color: #3b79fe;
          "
        >
          查看项目详情
        </div>
        <u-form-item
          label="用户的项目建议"
          label-position="top"
          prop="remark"
          >{{ form.remark ? form.remark : "无" }}</u-form-item
        >
        <div
          style="
            justify-content: flex-start;
            font-size: 30rpx;
            margin-top: 30rpx;
            color: red;
          "
        >
          该项目共分{{ planJsonData.length }} 期进行验收，请设置实施计划。
        </div>
        <u-form-item label="项目报价（元）" prop="bidPrice">
          <u-input
            type="number"
            placeholder="请填写金额"
            @blur="setPlanBrokerage"
            v-model="form.bidPrice"
          ></u-input>
          <div class="priceTips">
            *默认金额为本项目预算，您可修改，但付款方式（项目周期与付款比例）不可修改。
          </div>
        </u-form-item>
        <u-form-item label="预计完成日期" prop="deliveryDate" v-if="1==0" >
          <u-input
            type="select"
            placeholder="请选择"
            @click="deliveryDateShow = true"
            v-model="form.deliveryDate"
          ></u-input>
        </u-form-item>
        <u-picker
          mode="time"
          :params="timeParams"
          @confirm="setDeliveryDate($event)"
          v-model="deliveryDateShow"
        ></u-picker>
        <u-collapse
          ref="collapseView"
          :item-style="itemStyle"
          event-type="close"
          :arrow="true"
          :accordion="false"
        >
          <u-collapse-item
            :index="index"
            :open="true"
            :title="'第' + (index + 1) + '期'"
            v-for="(item, index) in planJsonData"
            :key="index"
          >
            <view class="collapse-item">
              <u-form-item
                label="工作内容与交付标准"
                label-position="top"
                :label-style="labelStyle"
              >
                <u-input
                  type="textarea"
                  placeholder="请填写本期的工作内容与交付标准。"
                  maxlength="8000"
                  height="500"
                  style="font-weight: normal"
                  v-model="item.content"
                >
                </u-input>
              </u-form-item>
              <u-form-item label="本期佣金（元）" :label-style="labelStyle">
                <div class="u-text-right" style="font-weight: normal">
                  {{ item.brokerage }}
                </div>
                <div class="priceTips">*由项目报价与付款方式决定，不可修改</div>
              </u-form-item>
              <u-form-item
                label="交付日期"
                :label-style="labelStyle"
                :border-bottom="false"
              >
                <u-input
                  style="font-weight: normal"
                  type="select"
                  :placeholder="
                    planJsonData.length - 1 === index
                      ? '与预计完成日期一致'
                      : '请选择'
                  "
                  @click="showSelect(index + 1)"
                  v-model="item.subDate"
                ></u-input>
              </u-form-item>

              <u-form-item v-if="1 === 0">
                <u-input v-model="item.sortNum"></u-input>
              </u-form-item>
            </view>
          </u-collapse-item>
        </u-collapse>
        <u-picker
          style="font-weight: normal"
          mode="time"
          :params="timeParams"
          @confirm="setPlanDate($event, subDateIndex)"
          v-model="subDateShow"
        ></u-picker>
      </u-form>
    </div>
    <u-button type="primary" shape="circle" @click="signupDemand"
      >提交计划
    </u-button>
  </div>
</template>

<script src="./js/partnerApplyAgain2.js"></script>
<style src="./css/publishJob.scss" lang="scss"></style>
